<div ng-controller="mainControl">
<div class="row">
	<div class="col-md-12">
		<div class="profile-container">

			<div class="profile-header row">

				<div class="col-lg-2 col-md-4 col-sm-12 text-center">
					<img src="{{user.headphoto}}" alt class="header-avatar"/>
				</div>
				<div class="col-lg-6 col-md-8 col-sm-12 profile-info">
					<div class="header-fullname">{{user.name}}</div>
					<hr style="height:3px; width: 50%;border:none;border-top:1px double gainsboro;margin-left: 0px;" />
					<div class="header-information">{{user.introduction}}</div>
				</div>
				<div class="col-lg-2 col-md-12 col-sm-12 col-xs-12 profile-stats">
					<div class="row">
						<div class="col-lg-2 col-md-12 col-sm-12 col-xs-12 stats-col" style="width: 100%;">
							<div class="stats-value pink">{{user.hiredate}}</div>
							<div class="stats-title" style="margin-top: 10px;">入职时间</div>
						</div>
						<div class="col-lg-2 col-md-4 col-sm-4 col-xs-4 inlinestats-col" style="width: 100%;">年龄:{{user.age}}岁</div>
					</div>
				</div>
				<div class="col-lg-2 col-md-4 col-sm-12 text-center">
					<!--<img src="img/jansen.jpg" alt class="header-avatar"/>-->
					<button class="btn btn-circle btn-success"  type="button" style="margin-top:40px; width:100px;height:100px">
						<span style="font-size: 20px;">签到</span>
					</button>
				</div>
			</div>

			<div class="profile-body">
				<div class="col-lg-12">
					<div class="tabbable">
						<ul class="nav nav-tabs tabs-flat nav-justified" id="myTab11">
							<li class="active">
								<a data-toggle="tab" href="#active2">功能</a>
							</li>
							<li class="tab-red">
								<a data-toggle="tab" href="#information">信息</a>
							</li>
							<li class="tab-palegreen">
								<a data-toggle="tab" href="#setting">设置</a>
							</li>
						</ul>
						<div class="tab-content tabs-flat">
							<div id="active2" class="tab-pane active">
								<div class="row">
									<div class="col-md-3 text-center">
										<a href="#" style="text-decoration: none;" id="askleave">
											<img src="img/考勤请假.png"  style="width: 100px;" class="image-circular"/><br>
											<span class="text-center " style="font-size: 22px;">我要请假</span>
										</a>
									</div>
									<div class="col-md-3 text-center">
										<a href="#" style="text-decoration: none;" id="askwork">
											<img src="img/考勤加班 (1).png"  style="width: 100px;" class="image-circular"/><br>
											<span class="text-center " style="font-size: 22px;">我要加班</span>
										</a>
									</div>
									<div class="col-md-3 text-center">
										<a ui-sref="myApply({id:'{{user.email}}',type:1})" style="text-decoration: none;">

											<img src="img/审批 (1).png"  style="width: 100px;" class="image-circular"/>
											<span id="redpoint" ng-if="replyNum!=0">{{replyNum}}</span>
											<br>

											<span class="text-center " style="font-size: 22px;">查看审批</span>
										</a>
									</div>
									<div class="col-md-3 text-center">
										<a href="#" style="text-decoration: none;" id="askout">
											<img src="img/外出 出差 (1).png"  style="width: 100px;" class="image-circular"/><br>
											<span class="text-center " style="font-size: 22px;">出差申请</span>
										</a>
									</div>
								</div>
							</div>

							<div id="information" class="tab-pane">
								<div class="row">
									<div class="col-md-12">
										<div class="col-md-4">
											<div class="profile-contacts">
												<div class="profile-badge red">
													<i class="fa fa-phone red"></i>
													<span>联系方式</span>
												</div>
												<div class="contact-info">
													<p class="index-contact">手机:{{user.phone}}<br>座机:0755-12345678 </p>
													<p class="index-contact">邮箱:{{user.email}} </p>
													<p class="index-contact">QQ:{{user.qq}}<br>We-chat:{{user.wechat}} </p>
												</div>
											</div>
										</div>
										<div class="col-md-4">
											<div class="profile-contacts">
												<div class="profile-badge azure">
													<i class="fa fa-map-marker azure"></i>
													<span>位置信息</span>
												</div>
												<div class="contact-info">
													<!-- <p class="index-contact">公司地址：<br>广东省湛江市麻章区海大路1号广东海洋大学海花A栋818 </p> -->
													<p class="index-contact">邮寄地址：<br>{{user.address}}</p>
												</div>
											</div>
										</div>
										<div class="col-md-4">
											<div id="contact-map" class="animated flipInY" >
												<iframe src="views/OaMap.html" width="400px" height="400px"></iframe>
											</div>
										</div>
									</div>
								</div>
							</div>

							<!--设置-->
							<div id="setting" class="tab-pane">
								<form role="form">
									<div class="form-title">个人信息</div>
								</form>
								<div class="row">
									<div class="col-sm-6">
										<div class="form-group">
											<label for="name">姓名</label>
											<input name="name" type="text" class="form-control" ng-model="newuser.name" placeholder="姓名" disabled/>

										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<label for="gender">性别</label>
											<select class="gender" name="gender" ng-model="newuser.gender">
												<option value="男">男</option>
												<option value="女">女</option>
											</select>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<label for="phone">手机号码</label>
											<span>
												<input name="phone" type="text" class="form-control" ng-model="newuser.phone" placeholder="手机号码"/>
											</span>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<div>
											    <div class="input-group">
															<label for="birth">出生年月</label>
											        <input name="birth" class="form-control date-picker" ng-model="newuser.birth" placeholder="出生年月" id="id-date-picker-1" type="text" data-date-format="yyyy-mm-dd">
											        <span class="input-group-addon">
											            <i class="fa fa-calendar"></i>
											        </span>
											    </div>
											</div>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<span>
												<input type="email" class="form-control" ng-model="newuser.email" placeholder="邮箱" disabled/>
											</span>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<span>
												<input type="text" class="form-control" ng-model="newuser.qq" placeholder="QQ"/>
											</span>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
											<span>
												<input type="text" class="form-control" ng-model="newuser.wechat" placeholder="We-chat"/>
											</span>
										</div>
									</div>
								</div>
								<hr class="wide" />
								<div class="row">
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="control-label col-sm-2" for="address">邮寄地址</label>
										    <div class=" col-sm-10">
										      <input type="text" name="address" ng-model="newuser.address" class="form-control" placeholder="邮寄地址"/>
										    </div>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="form-group">
										    <label class="control-label col-sm-2" for="hiredate">入职时间</label>
										    <div class=" col-sm-10">
										      <div class="input-group">
										          <input class="form-control date-picker" name="hiredate" ng-model="newuser.hiredate" placeholder="入职时间" id="id-date-picker-2" type="text" data-date-format="yyyy-mm-dd">
										          <span class="input-group-addon">
										              <i class="fa fa-calendar"></i>
										          </span>
										      </div>
										    </div>
										</div>
									</div>
									<div class="col-sm-12">
										<div class="form-group">
										    <label class="control-label col-sm-2" for="introduction">个人简介</label>
										    <div class=" col-sm-10">
										      <input type="text" class="form-control" name="introduction" ng-model="newuser.introduction" placeholder="个人简介"/>
										    </div>
										</div>
									</div>
								</div>
								<hr class="wide" />
								<button class="btn btn-palegreen" ng-click="updateUserById()" type="submit" style="font-size: 16px;">保存信息</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<!--请假单-->
<div id="LeaveApplication" style="display:none;">
    <div class="row">
        <div class="col-md-12">
            <div class="form-group">
               <!--  <input type="email" class="form-control" name="receiver"  placeholder="接收人邮箱" required > -->
               
				<select style="width: 100%;"  name="receiver" class="select">
             		 <option value="-1">请选择接收人邮箱</option>
					 <option ng-repeat="x in usersapply" value="{{x.email}}" ng-if="x.email!=user.email">{{x.name}}({{x.email}})</option>
				</select>
            </div>
            <div class="form-group">
                <textarea class="form-control" placeholder="请假原因" name="info" rows="5" required></textarea>
            </div>
            <div class="form-group">
            	<span>请假时间</span>
            	</div>
                <div class="input-group" style="margin-top:10px;">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" class="form-control daterange" name="daterange" required />
                </div>
        </div>
    </div>
</div>

<!--加班单-->
<div id="workApplication" style="display:none;">
    <div class="row">
        <div class="col-md-12">
            <div class="form-group">
                <!-- <input type="email" class="form-control" name="receiver"  placeholder="接收人邮箱" required > -->
                <select style="width: 100%;"  name="receiver" class="select">
             		 <option value="-1">请选择接收人邮箱</option>
					 <option ng-repeat="x in usersapply" value="{{x.email}}" ng-if="x.email!=user.email">{{x.name}}({{x.email}})</option>
				</select>
            </div>
            <div class="form-group">
                <textarea class="form-control" placeholder="加班原因"  name="info" rows="5" required></textarea>
            </div>
            <div class="form-group">
            	<span>加班时间</span>
            	</div>
                <div class="input-group" style="margin-top:10px;">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" class="form-control daterange" name="daterange" required />
                </div>
        </div>
    </div>
</div>

<!--出差单-->
<div id="outApplication" style="display:none;">
    <div class="row">
        <div class="col-md-12">
            <div class="form-group">
               <!--  <input type="email" class="form-control"  name="receiver"  placeholder="接收人邮箱" required > -->
                <select style="width: 100%;"  name="receiver" class="select">
             		 <option value="-1">请选择接收人邮箱</option>
					 <option ng-repeat="x in usersapply" value="{{x.email}}" ng-if="x.email!=user.email">{{x.name}}({{x.email}})</option>
				</select>
				
            </div>
            <div class="form-group">
                <textarea class="form-control" placeholder="出差原因" name="info" rows="5" required></textarea>
            </div>
            <div class="form-group">
            <!--	<span>出差地点</span>	-->
            	<div class="distpicker" style="margin-top:10px;">
							  <select name="sheng"  class="select"></select>
							  <select name="shi" class="select"></select>
							  <select name="qu" class="select"></select>
							</div>
            </div>
            <div class="form-group">
            	<!--<span>出差时间</span>-->
                <div class="input-group" style="margin-top:10px;">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input type="text" class="form-control daterange" name="daterange" required />
                </div>
            </div>
        </div>
    </div>
</div>

</div>
<script type="text/javascript">
	$('#id-date-picker-2').datepicker();
	$('#id-date-picker-1').datepicker();
	/* $(".select-email").select2({
		placeholder: "填写接收人邮箱",
		allowClear: true
	}); */
/* 	$("#leave-select2").select2(); */
</script>
